﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SharingCenter.Web.Classes
{


    public class WaitImage : System.Web.UI.WebControls.Image
    {
        public enum ImageSize
        {
            Size16 = 16,
            Size18 = 32,
            Size20 = 20,
            Size22 = 22,
            Size24 = 24,
            Size26 = 26,
            Size28 = 28,
            Size30 = 30
        }

        public ImageSize Size { get; set; }

        public WaitImage()
            : base()
        {
            this.Size = ImageSize.Size16;
            this.PreRender += new EventHandler(WaitImage_PreRender);
        }

        public override string ImageUrl
        {
            get
            {
                return base.ImageUrl;
            }
        }

        void WaitImage_PreRender(object sender, EventArgs e)
        {
            this.ImageUrl = "~/Content/images/icons/wait/wait" + (int)this.Size + ".gif";
        }
    }
}
